<script>
fss.needPagePublishPermission = true;
fss.loginReady(function(){
fss.checkPermission(<?php echo $sf_user->getUid() ?>, 'publish_stream,manage_pages', function (enabled) {
    if (enabled)
        fss.needPagePublishPermission = false;
});
</script>